const setUserInfo = (userInfo) => {
  uni.setStorageSync('userInfo', JSON.stringify(userInfo));
};

const getUserInfo = () => {
  return JSON.parse(uni.getStorageSync('userInfo') || '{}');
};

uni.$localStorage = {
  setUserInfo,
  getUserInfo
};